//封装请求
import request from "@/utils/request.js";
//基础配置
import APP from '@/config/app.js'
//活动人口
const Welfare = APP.Welfare;
//实例化
const url = request.request;
 
 
 
 //得到科目信息
  function getSubjectList(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'subject';//控制器
 	data['op'] = 'getSubjectList';//方法
 	return  url.post(Welfare, data);
 }
 //随机获取题
 function getRandomProject(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'project';//控制器
 	data['op'] = 'getRandomProject';//方法
 	return  url.post(Welfare, data);
 }
 
 //获取班级对应的配置
 function getTeamGradeOption(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'team';//控制器
 	data['op'] = 'getTeamGradeOption';//方法
 	return  url.post(Welfare, data);
 }
 
  
 //得到指定科目信息
  function getSubject(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'subject';//控制器
 	data['op'] = 'getSubject';//方法
 	return  url.post(Welfare, data);
 }
 //得到项目列表
  function getProjectList(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'project';//控制器
 	data['op'] = 'getProjectList';//方法
 	return  url.post(Welfare, data);
 }
 //得到项目信息
  function getProject(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'project';//控制器
 	data['op'] = 'getProject';//方法
 	return  url.post(Welfare, data);
 }
 //提交答案
  function setUserProject(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'project';//控制器
 	data['op'] = 'setUserProject';//方法
 	return  url.post(Welfare, data);
 }
 //得到项目结果
  function getUserHistoryProject(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'project';//控制器
 	data['op'] = 'getUserHistoryProject';//方法
 	return  url.post(Welfare, data);
 }
 //答题项目历史列表
  function getUserHistoryProjectList(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'project';//控制器
 	data['op'] = 'getUserHistoryProjectList';//方法
 	return  url.post(Welfare, data);
 }
 //获取等级
  function getGradeList(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'grade';//控制器
 	data['op'] = 'getGradeList';//方法
 	return  url.post(Welfare, data);
 }
 //申请查看训练者信息
  function addUserManage(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'users_manage';//控制器
 	data['op'] = 'addUserManage';//方法
 	return  url.post(Welfare, data);
 }
 //申请查看训练者信息列表
  function getUserManageList(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'users_manage';//控制器
 	data['op'] = 'getUserManageList';//方法
 	return  url.post(Welfare, data);
 }
 //训练者查看申请信息
  function getUserManage(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'users_manage';//控制器
 	data['op'] = 'getUserManage';//方法
 	return  url.post(Welfare, data);
 }
 //训练者确认申请者查看
  function setUserManage(data ={}) {
 	data['m'] = 'public_welfare';//模型
 	data['c'] = 'users_manage';//控制器
 	data['op'] = 'setUserManage';//方法
 	return  url.post(Welfare, data);
 }
export default {
	getTeamGradeOption,
	getRandomProject,
	getSubjectList,
	getSubject,
	getProjectList,
	getProject,
	setUserProject,
	getUserHistoryProject,
	getUserHistoryProjectList,
	getGradeList,
	addUserManage,
	getUserManageList,
	getUserManage,
	setUserManage,
}



